In developing software it is often first written as programming code in a programming language that humans may readily understand. The programming code then goes through a process of compilation in order to create executable code that computers may readily understand. A compiling and linking process is performed in order to generate the executable code. Computers follow the instructions in the executable code in order to perform all computer functions, including displaying user interfaces, connecting to the Internet, and performing other computing tasks such as enabling word processing and web browsing, providing web services, etc.
Programmers use an editor similar to a word processing program in order to write computer software. The editor usually allows programmers to type in their program, compile the program, and run the program in order to test it. In order to manage large software programs, the programs are often divided into separate units called modules. A module is computer code that is written to handle one or more related tasks and the code may often be managed together as a single unit. Different modules may then be written to manage particular tasks. For example, to write a web browsing program, there may be a module for managing bookmarks, a module to handle communications with Internet services, etc.
A software program or module written in programming code may refer to other software programs or modules. This is an efficient way to write a computer program, since it allows a computer programmer to reference already created code and thus does not have to re-create all code from scratch. Instead, the computer programmer is able to incorporate, or depend on, portions of libraries of code that may have been previously written by others. The programmer can then focus on writing the operative parts of their own specific software module.
In generating executable code from programming code, the code generator needs to know the order in which to compile modules. A first module that relies on a second module should be compiled after the second module. Programmers write configuration files in order to inform the code generator which configuration files rely, or depend on, other configuration files. A configuration file is a document declaring the dependencies of the modules, in order so that the code generator may properly order the compilation of modules. Configuration files thus declare the dependencies of software modules. The dependencies of software modules may affect the ordering in which modules are compiled. In some cases, modules do not depend on each other and therefore may be compiled in parallel.
Traditionally, a module is defined as a set, wherein the items are single files and/or other modules. If there is a change to any of the items in a module, the complete module needs to be re-compiled. Consequently, all modules depending on a particular module being re-compiled need to be re-compiled as well. Further, a compilation plan with a strategy for compiling, linking and other tasks is re-computed every time the modules are re-compiled.
Such re-compilations can be computationally expensive for large software products, costing valuable time and resources. A better technique of re-compilation to reduce the computational expense is therefore desired. In one approach, timestamps of files are examined to determine whether re-compilation is necessary. If the timestamp has not changed since a previous compilation, then the compilation process may be skipped since there has been no updates or changes to a software module. However, one drawback of such an approach is if the timestamps are not updated, then the changes to the programming code in the software module would not be updated in the executable code. Further, glitches in timestamps, e.g. when machines have different times, can lead to non-hermetic builds where some dependencies are not included, leading to undesirable results. In light of such drawbacks, a better approach to reducing the computational expense of re-compilation is sought.